#include"list.h"
#include<list>
using namespace std;
int& test(int& k)
{
	k = 6;
	int* x = new int;
	*x = 5;
	int l = 7;
	return l;
}

struct test2
{
	int k = 3;
	char arr[2] = { 0 };
public:
	void change()
	{
		k = 5;
	}

	void NotChange()
	{

	}

};

void test_ritreator()
{
	bit::list<int> k;
	for (int i = 0; i < 5; i++)
	{
		k.push_back(i);
	}
	auto y = k.rbegin();
	while (y != k.rend())
	{
		y++;
		cout << y._it.node->value;
	}
}

struct tt
{
	int x;
	int y;
	tt(int v=0,int z=0):
		x(v),
		y(z)
	{}
};
void test_operator_arrow()
{
	tt a1(1, 1);
	tt a2(2, 2);
	list<tt> t1;
	t1.push_back(a1);
	t1.push_back(a2);
	auto t2 = t1.begin();
	 t2->x;
	 auto t3 = t1.rbegin();
	 cout << t3->x;


}

int main()
{
	//bit::list<int> x;
	//x.push_back(1);
	//x.push_back(2);
	//x.insert(x.end(), 4);
	//x.erase(x.begin());
	//for (auto& item : x)
	//{
	//	cout << item<<" ";
	//}
	//cout << x.size() << " ";
	//cout << endl;
	//x.empty();
	//x.push_back(5);
	//for (auto& item : x)
	//{
	//	cout << item << " ";
	//}
	//cout << x.size() << " ";
	//cout << endl;

	////bit::list<int> v(x);
	//bit::list<int> v;
	//v = x;
	//for (auto item : v)
	//{
	//	cout << item << " ";
	//}
	//cout << endl;
	//test_ritreator();
	test_operator_arrow();
	





}
